{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 201,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "from PIL import Image\n",
    "img = Image.open('data/handwriting.png')\n",
    "#img\n",
    "#imgarr =  np.array(img)\n",
    "#imgarr.shape\n",
    "#imgarr\n",
    "img2 = img.rotate(-90).convert(\"L\")\n",
    "imgarr = np.array(img2) "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 202,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "from sklearn.preprocessing import binarize\n",
    "imagedata = np.where(1- binarize(imgarr, 0) == 1)\n",
    "#imagedata = np.where(1- binarize(imgarr, 0) == 1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 203,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXMAAAD+CAYAAADI4+UgAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHEdJREFUeJztnW+MZXdZx7/P0KndbWcsdiex6b+VaYrUuhV2TEwAoeFF\nGUOMjcFgBANYJtkOhCBKSa0vVn1nCDFsfLEOpoagCAvFiDsxWgq2IKazCEsptMzabUspzbRJa7eA\nWaaPL84ZuL177txz7+/c+z3P+X0/ycnMnHs+9/7+nPvMuec8zz3m7hBCCBGbGXYDhBBCpKNgLoQQ\nHUDBXAghOoCCuRBCdAAFcyGE6AAK5kII0QEUzIUQogMomAshRAcYGszN7AIzO2pmD5nZI2b2vnL9\nWTPbLJdPTL6pQgghBmHDKkDN7BIArwfwGQCXAPgmgCUA97j7/rovtG/fPt+/v/bmQgghAJw4ceIp\nd18Ytt15wzZw96cBfLr88ykzewzAxaM2aP/+/djY2BhVE0KIrDGzR+psN9I5czO7DsAFAO4HcImZ\nnTKzu81sacD2K2a2YWYbW1tbo7yUEEKIEagdzM1sH4CPAXiHF8y5+yKAvwZwZ5Xj7kfdfcndlxYW\n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\nDOBOFAFoh1aMH4DfBPCl8v3xIqY9fr0xBcA70bL9ryrmNb3/Tf3I3MxeCuBzAG5z9/uqtnH3x8pt\nrptm2/racA+Kj2f7y1VPALisZ5PLUXxkYvAuAB8d9GALxm/YWNHH0syuQvHx+vfd/fSg7cqP6V8C\n8IopNa3/9T8FYI+Z9Z6OpI9fya77ITCd8auIKa3a/6pi3kT2v0mc9N/lYsA8gHsBvGnA41f3XDS4\nH8Crp9y+CwFcWv7+SgCPA7iw5/FvoPimyJ0LoK+ZZvt62vg4gIvaNH4A3o6fXmA8iOIuVHtRXIB6\nAGWBWvn4+WUfXl725wEAV02xfZeh+JK4X91l+52xvArFG33/FNu3D8DF5e/LAB7s25Y6fj3j8p3e\neWWMX1VMadP+N6B9E9n/Jjb5Axp4O4DnUVxJ3lneD+CPysePozgafhDAu6fZtvL1F1Bc2T4F4KsA\nbkBxMW+nfa9CEdAfA/Dn025f2YZ3Avhoz983MccPRcbAJoqr9M+Wv98A4DYU94f9Fsp/KgDeDeB3\ny9/fWI71aQCHpty+Uz2/7yzn97XvG2X7vwngzVNu33vK1z5VBoLrWzZ+NwD4MwB/2rctY/yqYsrL\nWrT/VbXv85PY/1TOL4QQHUAVoEII0QEUzIUQogMomAshRAdQMBdCiA6gYC6EEB1AwVwIITqAgrkQ\nQnQABXMhhOgACuZCCNEB/h9OFH+jkueUAwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xabd9f98>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "plt.scatter(imagedata[0], imagedata[1], s = 100, c = 'red', label = 'Cluster 1')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 205,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#imagedata"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 207,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "X =np.column_stack([imagedata[0],imagedata[1]])\n",
    "#X"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 208,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "from sklearn.cluster import KMeans\n",
    "\n",
    "kmeans = KMeans(n_clusters = 2, init = 'k-means++', random_state = 42)\n",
    "y_kmeans = kmeans.fit_predict(X)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 210,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#y_kmeans"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 213,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 14.53900709,   6.65957447],\n",
       "       [ 12.98630137,  18.2739726 ]])"
      ]
     },
     "execution_count": 213,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "kmeans.cluster_centers_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 214,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.PathCollection at 0xabe77b8>"
      ]
     },
     "execution_count": 214,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "plt.scatter(X[y_kmeans == 0, 0], X[y_kmeans == 0, 1], s = 100, c = 'red', label = 'Cluster 1')\n",
    "plt.scatter(X[y_kmeans == 1, 0], X[y_kmeans == 1, 1], s = 100, c = 'blue', label = 'Cluster 2')\n",
    "plt.scatter(kmeans.cluster_centers_[:,0], kmeans.cluster_centers_[:,1], s = 100, c = 'yellow', label = 'Centroid')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 215,
   "metadata": {
    "collapsed": false,
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXMAAAD+CAYAAADI4+UgAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnXGMZXd13z9nwjjeW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nbhq8XwUeG9m21X4btW+oT7427M+2+26vGFLKmBtjW2tjbmYDYYzRHwYuU91Z3l0+BPzS4PNzVGfD\njwG/0KZtg+MvU93pvgh8EXgr1Q29Xft+iiqgPwX8WwP73gd8dOjvd1r2HVX2wBbVXftLg/dvBe6j\nmhv2Kwz+qQC/APzjwfu3D/r5CeBEi7ZdHHq/u9wwYtufDWz/MvDTLdr2i4PjXhwEhJ+06Lcpfv03\nwL8a2ba0y6ifAAAAW0lEQVTtvtsrhtxRyJjby7bfb2vMRTl/EARBB4gK0CAIgg4QwTwIgqADRDAP\ngiDoABHMgyAIOkAE8yAIgg4QwTwIgqADRDAPgiDoABHMgyAIOkAE8yAIgg7w/wFUnX5KR+XJ+wAA\nAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xab8b780>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 217,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "from sklearn.cluster import DBSCAN\n",
    "#?DBSCAN\n",
    "dbs = DBSCAN(eps=1, min_samples=3)\n",
    "y_dbs = dbs.fit_predict(X)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 218,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.PathCollection at 0xaaa53c8>"
      ]
     },
     "execution_count": 218,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "plt.scatter(X[y_dbs == 0, 0], X[y_dbs == 0, 1], s = 100, c = 'red', label = 'Cluster 1')\n",
    "plt.scatter(X[y_dbs == 1, 0], X[y_dbs == 1, 1], s = 100, c = 'blue', label = 'Cluster 2')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 219,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXMAAAD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uZCCNEDlMyFEKIHKJkLIUQPUDIXQogeoGQuhBA9\n4P8A9pLlj77CbSwAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xabd4978>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.show()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
